﻿//===============================================================================
// Copyright (C) 2007-2010  HARBORHOUSEHOME   
// ALL RIGHTS RESERVED
//===============================================================================
// FILENAME : BaseRequest
// DESCRIPTION :
// CREATED BY FETY AT   2010-5-14 14:56:37
//===============================================================================

using System;

namespace TaobaoAPI.Request
{
    public abstract class BaseRequest : ITopRequest
    {
        public const string APP_KEY = "app_key";
        public const string FORMAT = "format";
        public const string METHOD = "method";
        public const string TIMESTAMP = "timestamp";
        public const string VERSION = "v";
        public const string SIGN = "sign";
        public const string PARTNER_ID = "partner_id";
        public const string SESSION = "session";
        public const string FORMAT_XML = "xml";

        protected string serverUrl = "http://gw.api.tbsandbox.com/router/rest";
        protected string appKey;
        protected string appSecret;
        protected long partnerId = 110L;
        protected string format = FORMAT_XML;

        public BaseRequest(string _appkey, string _appSecret)
        {
            this.appKey = _appkey;
            this.appSecret = _appSecret;
        }

        public abstract string GetApiName { get; }
        public abstract string  DoPost(string sessionKey);
    }
}
